1. Field of the Invention
The present invention relates to an image processing method and apparatus, and to a storage medium storing a program realizing the image processing method. More particularly, the invention relates to an image processing method and apparatus for extracting objects from moving images, and to a storage medium storing software program codes for executing the image processing method.
2. Related Background Art
A compression coding method has been studied recently by which moving images are compression encoded in the unit of an object which is assumed to be a constituent of a moving image. Standardization works are under progress as MPEG-4. Since an object can take an arbitrary shape, it is expressed by a combination of data called a shape, which is representative of shape information and data called a texture, which is representative of the contents of an image.
Known object generation methods include a chromakey separation method, a method of generating an object through computer graphics (CG), a method of extracting an object from a natural image, and the like.
The chromakey method prepares a uniform blue background called a blue back and sets it in a studio, and cuts the blue back from the picked-up image to extract the object.
With computer graphics (CG), an image having a desired shape can be generated at any time so that a particular extraction method is not necessary. In the case of an animation image, each cell image is considered as an object so that the image can be processed in a manner similar to CG.
As a means for extracting an object from a natural image, active contour model energy minimization, called a snake, is well known (e.g., “Snakes: Active Contour Models”, by Michael Kass, Andrew Witkin, and Demetri Terzopoulos, International Journal of Computer Vision, Vol. 1, No. 3, pp. 321–331, 1988).
With the snake, an energy function is defined which takes a minimum energy when a contour (outline) is extracted, and a local minimum is calculated through iteration using a proper initial value. The energy function is defined by a linear sum of an external energy which is restriction on passing an edge point and an internal energy which is restriction on smoothness.
In order to use a snake, it is necessary to roughly designate an outline of an object to be extracted, as an initial outline. In the case of a moving image, it is necessary to set an initial outline of each frame. However, automatic setting is possible by using the extraction results of a previous frame as an initial value of a current frame. Techniques of obtaining an outline between frames are called tracking.
These extraction methods are all associated with severe problems. Namely, the chromakey method requires a uniform background color, and if it is required that extraction is to be performed at a high precision, a studio set of a robust scale is required. If the object contains the background color, the object cannot be correctly extracted so that the color of the object is limited.
Although computer graphics and animation do not require an extraction process, they are accompanied with a fatal problem that the quality of images is far inferior to natural images picked-up with a video camera.
The method of extracting an object from a natural image has on one hand the advantages that restriction on image contents is small and versatile processing is possible, and on the other hand the disadvantages that it is necessary to designate an initial outline correctly to some degree. The reason is because the calculation results of a local minimum of an active outline model are greatly influenced by the initial outline. In other words, if the initial outline is different from an actual object outline, the convergence results of calculation do not coincide with the actual object outline. Generally, a user sets an initial outline through graphical user interface (GUI) such as a mouse. Manual setting of an initial outline is not easy and initial outlines are hard to be set with good reproductivity. The more complicated the outline shape, the larger the user burden.